<div class="text-left sub_titulo"><h3>{$Tr->_('list_cat')}</h3></div>
<div class="text-right buscador ">

{include file = 'backend/layout/search.tpl'}
</div>
<!--Agrego link a crear categoria-->
{if $user_data->role eq "ADM"}
    <div class="nuevo text-right"><a href="/categoria/crear/" title="{$Tr->_('add')}" class="glyphicon glyphicon-plus-sign"></a></div>
{/if}


<table width="612" border="0" class="table table-hover">
    <tr >
    {if $rows==null}<th style="background-color: #000870; text-align: center;">No hay resultados para su búsqueda</th>
        {else}
        <th style="background-color: #000870;" width="170" >Id</th>
        <th style="background-color: #000870;" width="180">{$Tr->_('name')}</th>
        <th style="background-color: #000870;" width="248">{$Tr->_('created')}</th>
	<th style="background-color: #000870;" width="248">{$Tr->_('updated')}</th>
        <th style="background-color: #000870;" width="248" class="botones_opciones"></th>
    {/if}
    </tr>
  
  {foreach $rows as $row}
      
  <!--Creo link para actualizar categoria por id con row.id en nombre de categoria-->
  <tr>
    <td>{$row.id}</td>
    <td><a href="/categoria/actualizar/id/{$row.id}/">{$row.nombre}</a></td>
    <td>{$row.created|date_format:"%d/%m/%Y %I:%M:%S"}</td>
    <td>{$row.updated|date_format:"%d/%m/%Y %I:%M:%S"}</td>
    {if $user_data->role eq "ADM"}
        <td class="botones_opciones"><a href="/categoria/actualizar/id/{$row.id}/" title="{$Tr->_('update')} {$row.nombre}" class="glyphicon glyphicon-edit"></a> <a href="javascript:confirmar('/categoria/eliminar/id/{$row.id}/', '{$Tr->_("confirm_delete")} {$row.nombre}');" class="glyphicon glyphicon-trash" title="{$Tr->_('delete')} {$row.nombre}"></a></td>
  	{/if}
  </tr>
  {/foreach}
</table>

  {include file = 'backend/layout/pagination.tpl'}
